/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package flp.gui.listener;

import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

/**
 *
 * @author marek
 */
public class DoubleFieldKeyListener extends KeyAdapter
{
    @Override
    public void keyTyped(KeyEvent ke)
    {
        char c = ke.getKeyChar();
        if (!((Character.isDigit(c) ||
                (c == KeyEvent.VK_PERIOD) ||
                (c == KeyEvent.VK_BACK_SPACE) ||
                (c == KeyEvent.VK_DELETE))))
        {
            ke.consume();
        }
    }
}
